package cn.edu.hqu.cst.android.ls.viewtext;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

//引入通用的返回键
//使用通用控件的Activity来继承返回键

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        //
        Button bn1 = (Button) findViewById(R.id.bn1);
        bn1.setOnClickListener(new View.OnClickListener(){
                @Override
                public void onClick(View v){
                    Intent i = new Intent(MainActivity.this , Linear.class);
                startActivity(i);
}
             });
        Button bn2 = (Button) findViewById(R.id.bn2);
        bn2.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent i = new Intent(MainActivity.this , relative.class);
                startActivity(i);
            }
        });
        Button bn3 = (Button) findViewById(R.id.bn3);
        bn3.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent i = new Intent(MainActivity.this , frame.class);
                startActivity(i);
            }
        });
        Button bn4 = (Button) findViewById(R.id.bn4);
        bn4.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent i = new Intent(MainActivity.this , table.class);
                startActivity(i);
            }
        });
        Button bn5 = (Button) findViewById(R.id.bn5);
        bn5.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent i = new Intent(MainActivity.this , grid.class);
                startActivity(i);
            }
        });
    }
}




